/** @odoo-module **/
import {registry} from "@web/core/registry";
import {listView} from "@web/views/list/list_view";
import {ListController} from "@web/views/list/list_controller";
import {actionService} from "@web/webclient/actions/action_service";
import {useService} from "@web/core/utils/hooks"

export class RouteCollect extends ListController {

    setup() {
        super.setup();
        this.action = actionService.start(this.env);
        this.ormService = useService("orm");
        this.notificationService = useService('notification')
    }


    action_open_sync_view() {
        this.action.doAction({
            type: 'ir.actions.act_window',
            name: '第三方邮路同步',
            target: 'new',
            res_model: 'sync.route',
            views: [[false, 'form']],
        });

    }

}

registry.category("views").add("route_collect", {
    ...listView,
    Controller: RouteCollect,
    buttonTemplate: "third_express_connector.ListView.buttons",
});